CREATE PROCEDURE cursoLector_select 
AS
SELECT * from cursolector
GO



CREATE PROCEDURE cursoLector_insert_update
@id int output,
@curso varchar (50)
AS

if @id=0
begin
	insert into cursoLector (curso)
	values (@curso)
	set @id = (select @@identity)
end

else
begin
	update cursoLector
	set curso=@curso
	where id=@id
end